<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../vue.js"></script>

<body>
  <div id="app">
    <select name="frult" v-model="frult">
      <option value="苹果">苹果</option>
      <option value="香蕉">香蕉</option>
      <option value="榴莲">榴莲</option>
      <option value="葡萄">葡萄</option>
    </select>
    <h2>你选择的水果是: {{frult}}</h2>

    <!-- select设置为多选 用multiple属性 -->
    <select name="frults" v-model="frults" multiple>
      <option value="苹果">苹果</option>
      <option value="香蕉">香蕉</option>
      <option value="榴莲">榴莲</option>
      <option value="葡萄">葡萄</option>
    </select>
    <h2>你选择的水果有: {{frults.join()}}</h2>
  </div>
  <script>
    const app = new Vue({
      el: "#app",
      data: {
        frult: "苹果", // 如果是单选的select 就设置为一个字符串就好了
        frults: [] // 如果是多选的select 就设置为一个数组
      }
    })
  </script>
</body>

</html>